Skip to main content

All Questions

2votes
2answers
315views

Console dice game

I wrote a simple dice game with the purpose to practice arrays and classes. I would like some critique on my code structure and quality - as well as thoughts on my thoughts to improve it. Here's the ...
shaggy's user avatar
0votes
2answers
144views

ContactsList implementation in Java

I created a ContactsList class in Java that holds Person objects. I consider this is a side project for my GitHub profile. Any ...
Hamidur Rahman's user avatar
4votes
2answers
155views

Minimum difference between numbers in a file

I'm learning Java and I created a simple solution for the following problem: Given a file [filename].txt such that each line has the format ...
Richard Robinson's user avatar
1vote
1answer
107views

Correct modularization and array usage

I am trying to brush up on Java after not programming for a few years. The idea behind this code is simply to get used to object oriented programming, modularization techniques, and basic arrays. Any ...
J. Tate's user avatar
0votes
3answers
1kviews

Divisions using Arraylists

Exercise: Using Arraylists create a program that makes divisions between two very large numbers (numbers greater than 10 digits). I did it (the code works), but could my code be improved? ...
I likeThatMeow's user avatar
0votes
2answers
184views

Verifying if two numbers are equal using ArrayLists

I have some question about the code below. It works correctly, but: Is there a better/another way to solve the exercise (as an expert would have done:) or mine it's perfectly done? Also, I don't see ...
I likeThatMeow's user avatar
1vote
1answer
973views

Method that remove duplicates from a list of words in Java [closed]

Today, I took a coding challenge with this question: Given a List of Strings, write a method removeDuplicates that removes duplicate words from the List and returns an ArrayList of all the unique ...
TheLearner's user avatar
1vote
1answer
122views

Finding pair in an array with the OO approach

Description: I am trying to solve algorithmic problems mixing them with Object oriented design as part of my interview preparation. So, the question is given an array of integers find the pair of ...
CodeYogi's user avatar
7votes
3answers
6kviews

Let's play Rock, Paper, Scissors

I have written my first rock, paper, scissors project recently. I had to use a lot of if statements and System.out.println(); commands in the program. I am wondering what ways I could optimize my ...
user avatar
-2votes
1answer
2kviews

Implementing Arrays in Java Class

I have the following code to write: Modify the Student class so that instead of 3 tests you will now have an array of 100 tests. However, not all of the scores may be set. You need to add an ...
ch1maera's user avatar
3votes
3answers
4kviews

Clear ArrayList

I create class level static ArrayList by the following line. static ArrayList<Student> studentList = null; Then I create and fill ArrayList with some ...
Eclayaz's user avatar

close